import request from '@/utils/request'

const api_name = '/admin/sys/regionWare'
import {call} from "@/utils/rpc";
export default {

  getPageList(page, limit,searchObj) {
    searchObj.page = page
    searchObj.limit = limit
    return call("admin/sys/regionWare/list",searchObj)
  },
  getById(id) {
    return request({
      url: `${api_name}/get/${id}`,
      method: 'get'
    })
  },

  save(role) {
    return call("admin/sys/regionWare/add",role)
  },

  updateStatus(id, status) {
    return call("admin/sys/regionWare/updateState",{_id:id,status})
  },

  removeById(id) {
    return call("admin/sys/regionWare/delete",[id])
  },
  removeRows(idList) {
    return call("admin/sys/regionWare/delete",idList)
  }
}
